<me:UIVAART x:Class="WPFExcelReport.TDVA02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     xmlns:VAD="clr-namespace:WPFExcelReport;assembly=TVADBLATT"                  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIVAART.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:Divideby1000  x:Key="d1000"/> 
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIVAART.Resources>
     <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        
            <WrapPanel> 
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=保留品种:}}"/>
                    <TextBox Grid.Column="1"    Text="{Binding ART,ElementName=TV}" CharacterCasing="Upper" Width="160" />
                </Grid>
                <Button  Click="QueryCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button  Click="ResetSeq" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Delete.png" />
                    </Button.Background>
                </Button>
            </WrapPanel> 
        
        <DataGrid  Grid.Row="1"  
                   MaxHeight="400"
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0,0,0"
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=VAAKOLL,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=季节}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAART,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=品种}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAKURZBEZ,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=简述}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAABEZ,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=描述}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAABRTVON,Converter={StaticResource d100}}" Header="{Binding Source={Localization:Translate Word=幅宽}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAGEWVON,Converter={StaticResource d100}}" Header="{Binding Source={Localization:Translate Word=克重}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAANEUBEN,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=更改}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAAAENDDAT,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=日期}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAANEUBEN, Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=创建}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VAANEUDAT,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=日期}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIVAART>
